#include <cstdint>
#include <iostream>
#include <istream>
#include <set>
#include <string>
using ll = int64_t;

const ll b=233,p=1e9+7;

ll n;
std::string tmp;
std::set<ll> s;

static inline ll strhash(std::string &s){
    ll res=0;
    for(ll i=0;i<s.size();i++){
        res=(res*b+s[i]-'0')%p;
    }
    return res;
}

int main(){
    std::iostream::sync_with_stdio(false);
    std::cin.tie(nullptr);

    std::cin>>n;
    for(ll i=1;i<=n;i++){
        std::cin>>tmp;
        s.emplace(strhash(tmp));
    }
    std::cout<<s.size()<<"\n";
}